package cn.stylefeng.guns.weixin.cooperationUnit;

import cn.stylefeng.guns.modular.cooperationUnit.pojo.request.CooperationUnitRequest;
import cn.stylefeng.guns.modular.cooperationUnit.service.CooperationUnitService;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 合作单位表控制器
 *
 * @author jizhongbao
 * @date 2022/01/10 15:08
 */
@RestController
@ApiResource(name = "合作单位表")
public class CooperationUnitApiController {

    @Resource
    private CooperationUnitService cooperationUnitService;

    /**
     * 获取列表
     *
     * @author jizhongbao
     * @date 2022/01/10 15:08
     */
    @GetResource(name = "获取列表", path = "/cooperationUnit/apiList", requiredPermission = false, requiredLogin = false)
    public ResponseData list(CooperationUnitRequest cooperationUnitRequest) {
        return new SuccessResponseData(cooperationUnitService.findList(cooperationUnitRequest));
    }

}